class A
{

    public String name;
    public int age;
    public void eat()
    {
        System.out.println(name+"在吃饭！");
    }
//    public void Age()
//    {
//        System.out.println(age+"岁！");
//    }
}
class Dog extends A
{
//    public String name;
//    public int age;
//    public void eat()
//    {
//        System.out.println(name+"在吃饭！");
//    }
    public void wangwang()
    {
        System.out.println(name+"在旺旺叫！");
    }
}
class Cat extends A
{
//    public String name;
//    public int age;
//    public void eat()
//    {
//        System.out.println(name+"在吃饭！");
//    }
    public void wangwang()
    {
        System.out.println(name+"在喵喵叫！");
    }
}
public class Date {

    public static void main(String[] args) {
        Dog dog=new Dog();
        Cat cat=new Cat();
        dog.name="旺财";
        dog.eat();
        dog.wangwang();
        cat.name="喵喵";
        cat.eat();
        cat.wangwang();
    }
}